Hello and welcome to
this demonstration on using a Switch
Activity in studio. In this video, you
will learn to create a workflow that
will ask the user to enter any day from a week and tell whether it is a
weekday or a weekend. Let's begin, search for an input dialog activity
in the activities panel, and drag and drop it
in the designer panel. Let's rename the
sequence activity and add an annotation to it. Rename this input dialog
activity as User Input. In double-quotes
enter the title text. Taking user input in
the Dialogue Title box. Enter the label text. Enter any day from the week
in the input label box. From the Variables panel, create a variable day
with Variable type as String and set its Scope to
the sequence named as Switch. Go to the Properties panel of the input dialog
activity and enter the variable day in
its result property. Insert a switch activity below
the input dialog activity. Navigate to the properties
panel of the switch activity. Select "String" from the type
argument drop-down menu. Now, rename the switch activity. In the Switch activities
expression textbox, insert the variable Day, click "Add an activity" and drag and drop a message box activity
in the default section. Let's rename it. In the text box enter day plus is not
recognized as a day. Please try again
in double-quotes. Click "Add new case". You will create seven cases, one for each day enter
Monday in the first case, insert a message box activity in the activity area and
rename it as Monday. In double-quotes,
enter the text, it's a weekday in the text area. Repeat the same process for Tuesday, Wednesday,
Thursday, Friday, Saturday, and Sunday. Please write it's a weekend and the text area of the message
box for Saturday and Sunday. Save the project and run it. Let's test a few variations. Enter Tuesday and click "Okay". It shows it's a weekday. Rerun the process
and enter Saturday. It shows it's a weekend. Rerun it and enter January. It shows January
is not recognized as a day, please try again. With this, we now, come to the end of the demonstration. It is encouraged to create
a workflow as demonstrated, and try this activity
on your own. Thank you for watching.